<?php

namespace app\validate;
use think\Validate;

class user extends  Validate
{
    protected $rule = [
        'name'  =>  'require|max:20',
        'password' =>  'require|max:20',
    ];
    protected $message = [
        'name.require'  =>  '请输入用户名',
        'name.max'  =>  '用户名不能超过20个字符',
        'password.require' =>  '请输入密码',
        'name.require'  =>  '密码不能超过20个字符',
];
}